<?php

/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/8/8
 * Time: 15:25
 */
namespace App\Http\Controllers\Admin\Manage;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use App\Services\Admin\ManageService;
use App\Http\Requests\Admin\UserRequest;
use \App\Http\Controllers\Admin\BaseController;

/**
 * 会员用户管理
 * Class ManagerController
 * @package App\Http\Controllers\Admin\Manage
 */
class ManagerController extends BaseController
{
    protected $service;

    public function __construct(ManageService $service)
    {
        parent::__construct();
        $this->service = $service;
    }

    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
        $result = $this->service->index();
        return request()->ajax() ? $result : view('themes.admin.manage.list')->with($result);
    }
}